package fr.umlv.m2.jee.spij.service.partial;

import fr.umlv.m2.jee.spij.service.ldap.authentification.DisplayActor;
import org.springframework.binding.message.MessageContext;

import java.util.List;

/**
 * @author thomas magny
 */
public interface IDisplayPartialService {

    /**
     * @param unitId
     *
     * @return
     */
    public List<DisplayPartial> getAllDisplayPartial(final long unitId, MessageContext context);

    /**
     * Returns all the Partials given for an user.
     *
     * @param unitId the unit foreign key
     *
     * @return a list of DTO that contains the displayed data
     */
    public List<DisplayPartial> getAllDisplayPartialPerUser(final long unitId, DisplayActor currentUser, MessageContext context);

    /**
     * @param id
     *
     * @return
     */
    public DisplayPartial getPartialById(final long id, MessageContext context);

    /**
     * @param partial
     * @param unitId
     * @param context
     *
     * @return
     */
    public boolean createPartial(final DisplayPartial partial, final long unitId, final MessageContext context);

    /**
     * @param modifiedPartial
     * @param context
     *
     * @return
     */
    public boolean updatePartialById(final DisplayPartial modifiedPartial, final MessageContext context);

    /**
     * @param id
     * @param context
     *
     * @return
     */
    public boolean deletePartialById(long id, final MessageContext context);
}
